<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../js/vue.js"></script>
    <title>模板语法</title>
</head>
<body>
    <div id="root">
        <h1>插值语法</h1>
        <span>{{name}}</span>
        <h1>指令语法</h1>
        <h2>v-bind:</h2>
        <a v-bind:href="url">link</a>
        <!-- 可简写冒号 -->
        <a :href="url">link</a>
        <!-- 可以为js表达式 -->
        <a :href="Date.now()">link</a>
    </div>

<script>
   
    let app = new Vue({
        el:'#root', 
        data: {
          name:`插值语法用法：{{变量名}}`,
          url:`http://www.baidu.com`
        },
        methods: {

        }
    });

</script>
</body>
</html>